﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using kim.Common;

namespace kim
{
    public partial class AddorEditMessage : kim.UI.ManagePage
    {
        private int Nid,typeId;
        protected void Page_Load(object sender, EventArgs e)
        {
            Nid = KIMRequest.GetInt("id", 1);
           
            GetMessage(Nid);
        }

        private void GetMessage(int id)
        {
            Model.Message mo = new BLL.Message().GetModel(id);
            txtName.Value = mo.MsUserName;
            if (mo.MsGender == 1) rbn.Checked = true;
            else rbv.Checked = true;
            txtCom.Value = mo.MsTitle;
            txtDpt.Value=mo.MsBudget;
            txtTel.Value = mo.MsTel;
            txtEmail.Value = mo.MsEmail;
            txtBrand.Value = mo.MsLfdate;
            txtWurl.Value = mo.MsAddress;
            if (rbareagn.Checked) mo.MsModel = 1;
            else mo.MsModel = 0;
            ddlServiceType.SelectedValue = mo.MsBrand.ToString();
            txtOthers.Value = mo.MsContent;
        }       
    }
}








